Telegram Group & Telegram Channel
Как скопировать структуру директорий в Linux

В этой статье мы расскажем как в две команды скопировать структуру директорий без файлов через командрую строку Linux.

Сначала необходимо перейти в директорию, где находятся нужная структура
# cd /dir1

Затем выполняем команду, которая находит директории и сохраняет пути к ни в файл
# find . -type d > dirs.txt

Теперь необходимо перенести этот файл в директорию, где мы хотим воссоздать структуру
# mv ./dirs.txt /dir2

Переходим туда
# cd /dir2

И используя xargs читаем из файла пути и создаем по ним структуру директорий
# xargs mkdir -p < dirs.txt



tg-me.com/linux_srv/452
Create:
Last Update:

Как скопировать структуру директорий в Linux

В этой статье мы расскажем как в две команды скопировать структуру директорий без файлов через командрую строку Linux.

Сначала необходимо перейти в директорию, где находятся нужная структура
# cd /dir1

Затем выполняем команду, которая находит директории и сохраняет пути к ни в файл
# find . -type d > dirs.txt

Теперь необходимо перенести этот файл в директорию, где мы хотим воссоздать структуру
# mv ./dirs.txt /dir2

Переходим туда
# cd /dir2

И используя xargs читаем из файла пути и создаем по ним структуру директорий
# xargs mkdir -p < dirs.txt

BY Типичный Сисадмин




Share with your friend now:
tg-me.com/linux_srv/452

View MORE
Open in Telegram


Типичный Сисадмин Telegram | DID YOU KNOW?

Date: |

NEWS: Telegram supports Facetime video calls NOW!

Secure video calling is in high demand. As an alternative to Zoom, many people are using end-to-end encrypted apps such as WhatsApp, FaceTime or Signal to speak to friends and family face-to-face since coronavirus lockdowns started to take place across the world. There’s another option—secure communications app Telegram just added video calling to its feature set, available on both iOS and Android. The new feature is also super secure—like Signal and WhatsApp and unlike Zoom (yet), video calls will be end-to-end encrypted.

Telegram Gives Up On Crypto Blockchain Project

Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”

Типичный Сисадмин from us


Telegram Типичный Сисадмин
FROM USA